<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h3>具名插槽</h3>
      <child>
        <!-- <span>111</span>
        <span>222</span> -->
        <!-- <span>444</span> -->

        <template v-slot:left>
          <span>111</span>
        </template>

        <template #right>
          <span>222</span>
        </template>

        <template v-slot:default>
          <span>333</span>
        </template>
      </child>
    </div>

    <script src="../Vue.js"></script>
    <script>
      const Child = {
        template: `
          <div>
            <slot name="left"></slot> - child - <slot name="right"></slot> - <slot></slot>
          </div>
        `,
      };

      new Vue({
        el: "#app",
        data: {},
        components: {
          Child,
        },
      });
    </script>
  </body>
</html>
